'''
Created on 19 janv. 2012

@author: e0009298
'''

from formencode import Schema, validators

class PayeeForm(Schema):
    title = validators.UnicodeString(not_empty=True)

class CategoryForm(Schema):
    title = validators.UnicodeString(not_empty=True)
    
class AccountForm(Schema):
    title = validators.UnicodeString(not_empty=True)
    account_type = validators.UnicodeString(not_empty=False)
    number = validators.UnicodeString(not_empty=False)
    bank_name = validators.UnicodeString(not_empty=False)
    initial_amount = validators.Number(not_empty=True)

class OperationForm(Schema):
    paymode = validators.UnicodeString(not_empty=True)
    paymode_note = validators.UnicodeString(not_empty=False)
    date = validators.DateConverter(not_empty=True, month_style='dd/mm/yyyy')
    payee = validators.NotEmpty()
    category = validators.NotEmpty()
    expense = validators.Number(not_empty=True)
    income = validators.Number(not_empty=True)
